home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / infosrvr / dev / www_talk.930 / 000484_guido@cwi.nl _Fri Dec 11 16:06:26 1992.msg < prev    next >
Internet Message Format  |  1994-01-24  |  4KB

  1. Return-Path: <guido@cwi.nl>
  2. Received: from dxmint.cern.ch by  nxoc01.cern.ch  (NeXT-1.0 (From Sendmail 5.52)/NeXT-2.0)
  3.     id AA12408; Fri, 11 Dec 92 16:06:26 MET
  4. Received: by dxmint.cern.ch (5.65/DEC-Ultrix/4.3)
  5.     id AA16140; Fri, 11 Dec 1992 16:19:54 +0100
  6. Received: from voorn.cwi.nl by charon.cwi.nl with SMTP
  7.     id AA14739 (5.65b/3.2/CWI-Amsterdam); Fri, 11 Dec 1992 16:19:47 +0100
  8. Received: by voorn.cwi.nl with SMTP
  9.     id AA00320 (5.65b/3.2/CWI-Amsterdam); Fri, 11 Dec 1992 16:19:45 +0100
  10. Message-Id: <9212111519.AA00320.guido@voorn.cwi.nl>
  11. To: www-talk@nxoc01.cern.ch
  12. Subject: Re: Gopher+ Considered Harmful 
  13. In-Reply-To: Your message of "Fri, 11 Dec 1992 15:18:01 MET."
  14.              <9212111418.AA02698@www3.cern.ch> 
  15. From: Guido.van.Rossum@cwi.nl
  16. X-Organization: CWI, Kruislaan 413, 1098 SJ Amsterdam, The Netherlands
  17. X-Phone: +31 20 5924127 (work), +31 20 6225521 (home), +31 20 5924199 (fax)
  18. Date: Fri, 11 Dec 1992 16:19:45 +0100
  19. Sender: Guido.van.Rossum@cwi.nl
  20.  
  21. Tim writes:
  22.  
  23. >It is not the space to buffer the stuff in the average case which is a problem
  24. >
  25. >There are extreme cases: Long documents which spew out of format converters
  26. >piped into other format converters.  These things wouyld blow the memory of a
  27. >server which we never like to do.
  28. >
  29. >There is the cumulative effect of response times. Curerntly, almost all the W3
  30. >code is pipelines, so the reponse (click mouse to first character on screen)
  31. >is a function of the round trip delays and any real retrieval time. The moment
  32. >you put a buffer in to count bytes, you have to wait for the first until the
  33. >last is available. In the (frequent) case of many stages being involved in a
  34. >pipeline the response time does not in fact increase much, you just get a lot
  35. >of CPU from processors on the pipe line.  Once you buffer it up, you are using
  36. >CPU from one processor at a time.   You can't start displaying it until you've
  37. >parsed it and you can't parse it until you've read it and you can't read it
  38. >until the server has counted it and he can't even start to count it until all
  39. >the real work has been finished.
  40. >
  41. >You will notice the difference immediately.
  42.  
  43. Yes, I see.  This means there is a problem whether you put a byte
  44. count in the header or in an "envelope" sent before the header, so
  45. Dan's solution is just as wrong as mine. :-(
  46.  
  47. >Piping things until EOF is so much faster.  Can TCP really not tell the
  48. >difference between a remote connection close, and a broken connection? :-((
  49. >(APIs apart)
  50.  
  51. I tried to find out a definitive answer but it is hard to figure out.
  52. At the kernel level there is definitely a difference between a
  53. shutdown by the remote side and a network failure, but at least on
  54. UNIX both situations are passed to the client as an EOF.
  55.  
  56. One solution would be to add a standard string after the document,
  57. e.g. CR LF "*%*%*%END-OF-DOCUMENT%*%*%*" CR LF, so that the client can
  58. assume it has received the whole file if it sees this at the end of
  59. the file.  The client cannot assume that the data *ends* when it sees
  60. this (it is not another form of dot-on-a-line-by-itself), since it may
  61. occur within the data as well, but it will know that it didn't get the
  62. whole data if it doesn't end with this.
  63.  
  64. A better version would be to if the server could calculate a simple
  65. checksum or "signature" (e.g. MD5) of the data and append this to the
  66. end of the data.
  67.  
  68. --Guido van Rossum, CWI, Amsterdam <guido@cwi.nl>
  69. "I'm sorry but I'm not allowed to argue unless you pay."